﻿using SqlSugar;

namespace WeDonekRpc.SqlSugar.VirtualQuery
{
    public struct WhereCol : IWhereCol
    {
        public string Name { get; set; }

        public object Value { get; set; }

        public ConditionalType ConditionalType { get; set; }

        public FuncType Func { get; set; }

        public System.Data.DbType DbType { get; set; }

        public WhereTable? Table { get; set; }

        public bool IsAnd { get; set; }

        public IWhereCol Clone ()
        {
            return (IWhereCol)this.MemberwiseClone();
        }
        internal WhereCol CloneWhere ()
        {
            return (WhereCol)this.MemberwiseClone();
        }
    }
    public struct WhereTable
    {
        /// <summary>
        /// 表名
        /// </summary>
        public string Table { get; set; }

        /// <summary>
        /// 当前关联列名
        /// </summary>
        public string Key { get; set; }

        /// <summary>
        /// 关联的列名
        /// </summary>
        public string Foreign { get; set; }
    }
}
